/***************************************************************************
 *   Copyright (C) 2009 by Bernhard Neuhofer   *
 *   mail@bneu.at   *
 *                                                                         *
 *   This program is free software; you can redistribute it and/or modify  *
 *   it under the terms of the GNU General Public License as published by  *
 *   the Free Software Foundation; either version 2 of the License, or     *
 *   (at your option) any later version.                                   *
 *                                                                         *
 *   This program is distributed in the hope that it will be useful,       *
 *   but WITHOUT ANY WARRANTY; without even the implied warranty of        *
 *   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the         *
 *   GNU General Public License for more details.                          *
 *                                                                         *
 *   You should have received a copy of the GNU General Public License     *
 *   along with this program; if not, write to the                         *
 *   Free Software Foundation, Inc.,                                       *
 *   59 Temple Place - Suite 330, Boston, MA  02111-1307, USA.             *
 ***************************************************************************/


#ifndef __MODELENTITY_H
#define __MODELENTITY_H
class ModelEntity;
#include "AbstractLp.h"
#include <vector>
/*
* @brief Root of all ModelEntitys
*/
class ModelEntity
{
	public:

		/**
		 * Constructs a model entity, links it to its associated LP and initialises the array with the IDs of the LPs known to theis LP/model entity.
		 * @param assocLp Reference to the associated LP
		 * @param neighbors The IDs of the known neighbors
		 */
		ModelEntity ( AbstractLp *assocLp,vector<unsigned int> neighbors ) :_assocLp ( assocLp ), _neighbors ( neighbors )
		{}

		/**
		 * Returns the array with the MEs neighbors
		 * @return AbstractLp associated LP of the ME
		 */
		virtual AbstractLp * getAssocLp();
		/**
		 * Returns the array with the Mes neighbors.
		 * @return neighbors Neighbors of the ME
		 */
		vector<unsigned int> getNeighbors();

		
	private:
//Array with th IDs of the LPs known to this LP/model Entity.
		vector<unsigned int> _neighbors;

//Contains the reference to the associated LP.
		AbstractLp * _assocLp;
		Interpreter* _assocInterpreter;



};

#endif //MODELENTITY
